function throttle(fn,delay=1000){
    let timer = null;
    return function(){
        if(timer){
            // console.log(timer);
            return
        }
        timer=setTimeout(()=>{
            fn.apply(this)
            timer =null;
        },delay)
    }
}
export default throttle;